Eclipse Platform
Pre-release 3.0

org.eclipse.core.runtime
Interface IExtension


public interface IExtension

An extension declared in a plug-in. All information is obtained from the declaring plug-in's manifest (plugin.xml) file.

This interface is not intended to be implemented by clients.


Method Summary
 IConfigurationElement[] getConfigurationElements()
          Returns all configuration elements declared by this extension.
 IPluginDescriptor getDeclaringPluginDescriptor()
          Returns the descriptor of the plug-in that declares this extension.
 String getExtensionPointUniqueIdentifier()
          Returns the unique identifier of the extension point that this extension gets plugged into.
 String getLabel()
          Returns a displayable label for this extension.
 String getParentIdentifier()
          Returns the identifier of the parent of this extension.
 String getSimpleIdentifier()
          Returns the simple identifier of this extension, or null if this extension does not have an identifier.
 String getUniqueIdentifier()
          Returns the unique identifier of this extension, or null if this extension does not have an identifier.
 

Method Detail

getConfigurationElements

public IConfigurationElement[] getConfigurationElements()
Returns all configuration elements declared by this extension. These elements are a direct reflection of the configuration markup supplied in the manifest (plugin.xml) file for the plug-in that declares this extension. Returns an empty array if this extension does not declare any configuration elements.

Returns:
the configuration elements declared by this extension

getDeclaringPluginDescriptor

public IPluginDescriptor getDeclaringPluginDescriptor()
Returns the descriptor of the plug-in that declares this extension.

Note: This is obsolete API that will be replaced in time with the OSGI-based Eclipse Platform Runtime introduced with Eclipse 3.0. This API will be deprecated once the APIs for the new Eclipse Platform Runtime achieve their final and stable form (post-3.0).

Returns:
the plug-in that declares this extension

getParentIdentifier

public String getParentIdentifier()
Returns the identifier of the parent of this extension. This value can be used in various global facilities to discover the actual parent.

Note: This is an early access API to the new OSGI-based Eclipse 3.0 Platform Runtime. Because the APIs for the new runtime have not yet been fully stabilized, they should only be used by clients needing to take particular advantage of new OSGI-specific functionality, and only then with the understanding that these APIs may well change in incompatible ways until they reach their finished, stable form (post-3.0).

Returns:
the idenifier of the parent
Since:
3.0
See Also:
Plarform.getBundle(String)

getExtensionPointUniqueIdentifier

public String getExtensionPointUniqueIdentifier()
Returns the unique identifier of the extension point that this extension gets plugged into.

Returns:
the unique identifier of the relevant extension point

getLabel

public String getLabel()
Returns a displayable label for this extension. Returns the empty string if no label for this extension is specified in the plug-in manifest file.

Note that any translation specified in the plug-in manifest file is automatically applied.

Returns:
a displayable string label for this extension, possibly the empty string
See Also:
IPluginDescriptor.getResourceString(java.lang.String)

getSimpleIdentifier

public String getSimpleIdentifier()
Returns the simple identifier of this extension, or null if this extension does not have an identifier. This identifier is specified in the plug-in manifest (plugin.xml) file as a non-empty string containing no period characters ('.') and must be unique within the defining plug-in.

Returns:
the simple identifier of the extension (e.g. "main") or null

getUniqueIdentifier

public String getUniqueIdentifier()
Returns the unique identifier of this extension, or null if this extension does not have an identifier. If available, this identifier is unique within the plug-in registry, and is composed of the identifier of the plug-in that declared this extension and this extension's simple identifier.

Returns:
the unique identifier of the extension (e.g. "com.example.acme.main"), or null

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.